home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / wunzip12.arc / UNZIP.CPM < prev    next >
Text File  |  1991-04-12  |  1KB  |  41 lines

  1. ;If you use Command Post by Morrie Wilson, try adding this to your
  2. ;CMDUSER.CPM file!
  3. ; "Test" creates a subdir beneath the current one with the root
  4. ; name of the file to be tested. It then unzips the file in that
  5. ; dir (with WinUnZip of course) so you can test the file out with-
  6. ; out cluttering up another directory.
  7.  
  8. ;-------------------------------------------------------------------------
  9. &Zip
  10.  &Test... \ ^T
  11.     f=CurrentFile()
  12.     r=FileRoot(f)
  13.     e=strupper(FileExtension(f))
  14.     
  15.     DirMake("%r%")
  16.     FileCopy("%f%", "%r%", @TRUE)
  17.     DirChange("%r%")
  18.     
  19.     IF e=="ZIP" then Run("WinUnZip.exe"," %f%")
  20.     If e=="EXE" then Run("%f%","")
  21.  
  22.     FileDelete("%f%")
  23.     SetDisplay("","","")
  24.     OtherUpdate()
  25.     drop(f,r,e)
  26.  
  27.  &UnZip a file
  28.     ErrMs="Not a ZIP file!"
  29.     CFile=CurrentFile()
  30.     CFRoot=FileRoot(CFile)
  31.     CFExt=FileExtension(CFile)
  32.     Terminate(CFExt != "ZIP","",ErrMs)
  33.     Run("WinUnZip.exe"," %CFile%")
  34.     SetDisplay("","","")                    ;Re-read dir.
  35.     drop(CFile,ErrMs,CFRoot,CFExt)
  36.  
  37.  &WinUnZip
  38.     Run("WinUnZip.exe","")
  39.     SetDisplay("","","")                    ;Re-read dir.
  40.  
  41.